﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WjAutoConfigApp
{
    public partial class BigPictureForm : Form
    {

        public event Action DoSomeThing;
        /// <summary>
        /// 图像的基本路径
        /// </summary>
        private string FilePath { get; set; }
        public BigPictureForm()
        {
            InitializeComponent();
        }

        public BigPictureForm(string filePath)
        {
            InitializeComponent();
            FilePath = filePath;
        }

        private void BigPictureForm_Load(object sender, EventArgs e)
        {
            var myBmp = new Bitmap(FilePath);
            bigPictureBox.Image = myBmp;
            bigPictureBox.SizeMode = PictureBoxSizeMode.StretchImage; //设置picturebox为缩放模式
            
        }

        private void BigPictureForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            DoSomeThing?.Invoke();
        }
    }
}
